package jp.co.sn.mml.pojo.tmryskg;

import jp.co.sn.mml.pojo.tsprogram.Tsprogram;

public class TmryskgId implements java.io.Serializable { 

	//利用者グループコード
	private String rysGrpCd;
	//プログラムID
	private Tsprogram programId;
	//マスタ実行権限区分
	private String mstKgKbn;

	/** default constructor */
	public TmryskgId(){

	}

	/** full constructor */
	public TmryskgId(String rysGrpCd,Tsprogram programId,String mstKgKbn){
		this.rysGrpCd = rysGrpCd;
		this.programId = programId;
		this.mstKgKbn = mstKgKbn;
	}

	//Property accessors
	public String getRysGrpCd(){
		return this.rysGrpCd;
	}

	public void setRysGrpCd(String rysGrpCd){
		this.rysGrpCd=rysGrpCd;
	}

	public Tsprogram getProgramId(){
		return this.programId;
	}

	public void setProgramId(Tsprogram programId){
		this.programId=programId;
	}

	public String getMstKgKbn(){
		return this.mstKgKbn;
	}

	public void setMstKgKbn(String mstKgKbn){
		this.mstKgKbn=mstKgKbn;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmryskgId))
			return false;

		TmryskgId castOther = (TmryskgId) other;

		return ((this.getRysGrpCd() ==  castOther.getRysGrpCd())
				||(this.getRysGrpCd()!=null && castOther.getRysGrpCd() !=null 
					&& castOther.getRysGrpCd() !=null 
					&& this.getRysGrpCd().equals(castOther.getRysGrpCd())))
			&& ((this.getProgramId() ==  castOther.getProgramId())
				||(this.getProgramId()!=null && castOther.getProgramId() !=null 
					&& castOther.getProgramId() !=null 
					&& this.getProgramId().equals(castOther.getProgramId())))
			&& ((this.getMstKgKbn() ==  castOther.getMstKgKbn())
				||(this.getMstKgKbn()!=null && castOther.getMstKgKbn() !=null 
					&& castOther.getMstKgKbn() !=null 
					&& this.getMstKgKbn().equals(castOther.getMstKgKbn())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getRysGrpCd() == null ? 0 : this.getRysGrpCd().hashCode());
		result = 37 * result
				+ (getProgramId() == null ? 0 : this.getProgramId().hashCode());
		result = 37 * result
				+ (getMstKgKbn() == null ? 0 : this.getMstKgKbn().hashCode());
		return result;
	}

}